Repository navigation
Part of #38210: Audit Logs show exact time, affected asset, field path and old → new values - #38290
Conversation
…y with field changes Part of #38210
|
Closing for now; will recreate once the design for the new audit log elements is ready. |
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
UI browser testsRan: all test files (no impact map from main yet) Result: ✅ 1072 passed · 154 skipped Changed files no browser test loads
|
…nd 3-line clamp (ADR) Part of #38210
…keep angle-bracket text such as map<string,int> Part of #38210
Code Review ✅ Approved 🟡 Medium risk 2 closed / 2 findingsThe audit-log UI now parses and truncates field-change values to five records or three lines, which could hide details users rely on when inspecting events. Renders exact timestamps, affected assets, field paths and old-to-new values for each Audit Logs entry, with core Tag and OwnerChip components for tags, owners and similar fields. Resolved the Typography colour being set via className, which contradicted the core-styling ADR, and the HTML-stripping that dropped angle-bracket text such as ✅ 2 closed✅ Quality: Core Typography text colour set via className, contradicting core-styling ADR
✅ Edge Case: HTML-stripping drops angle-bracket text such as
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
…ld path and old → new values (backport 2.1 #38290) (#38686) * [2.1] Part of #38210: Audit Logs show exact time, affected asset, field path and old → new values (backport 2.1 #38290) * Audit Logs: import order for ui-checkstyle; record the 5-record cap and 3-line clamp (ADR) Part of #38210 * Audit Logs: Typography colour via the color prop (core-styling ADR); keep angle-bracket text such as map<string,int> Part of #38210
…ld path and old → new values (backport 2.0 #38290) (#38687) * [2.0] Part of #38210: Audit Logs show exact time, affected asset, field path and old → new values (backport 2.0 #38290) * Audit Logs: import order for ui-checkstyle; record the 5-record cap and 3-line clamp (ADR) Part of #38210 * Audit Logs: keep angle-bracket text such as map<string,int> (only parse real HTML) Part of #38210
…rticle-permission and Audit Logs backports (#38887) * test(playwright): align Context Center and Audit Logs specs with 2.0 backports Two 2.0 backports changed the UI without updating these specs, so they fail on every 2.0 nightly. - ContextCenterPermission: #38821 (#38800) gates the article header on the article's own permission. The spec's article had no owner, and OrganizationPolicy-NoOwner-Rule lets any user set the owner of an unowned asset, so edit-owner-btn is now correctly shown to view-only and Data Consumer users. Give the article an owner (the admin) so the check is about EditOwners again, and open that article in the role-based tests instead of whichever article is first in the tree. - AuditLogs: #38687 (#38290) renders the change summary with data-testid="description-content" instead of the description-content class. Select it by test id, as main's spec already does. * test(playwright): drop the two ContextCenterPermission positional-locator suppressions this change removed
Describe your changes:
Part of #38210
Settings → Access Control → Audit Logs showed only a relative time and the server's one-line
summary. That summary drops the column name, shows only the new value and cuts off at 80 characters. The API already returnseventTsand the fullchangeEvent.changeDescription, so this PR renders them. UI only; the API and the Export are unchanged.Each row in the list now shows:
Nov 25, 2026, 04:27 PM (UTC+05:30) · 1 minute ago, using the existingformatDateTime, so the user's 12h/24h setting applies.Columns › customer_id › Tags), and the value.Tags with a colored dot; owners render as coreOwnerChips.key valuerecord per item, up to 5. A single object (e.g. pipeline status) shows as inlinekey valuepairs. Statuses get colored pills and IDs are shortened.from → totables instead of the rawentityLineageAddedsummary.Pure logic lives in the new
AuditLogList.utils.ts.Backports: 2.1 #38686 (same code), 2.0 #38687 (2.0 has no
OwnerChip,getSettingsLinkorBadgehref, so owners stay a linked chip there).Not in this PR (follow-ups on #38210): the Event Type and Service filters, and a per-event detail view.
Type of change:
High-level design:
AuditLogList.utils.ts(pure, no React) parses eachFieldChangeinto a typedChangeValue:refs(tags, tiers, glossary terms, domains, owners, other entity references),records(a list of objects),keyValue(a single object) ortext. It also formats inline values (dates, statuses, IDs), builds links and reads lineage edges.AuditLogList.component.tsxrenders the row (header, change lines, meta line) from those types with coreBadge,Tag/TagGroup,OwnerChip,BoxandTypography. The list shell, empty states and skeleton are unchanged.summary. A single string can't link to the asset or render old → new values cleanly.Tests:
Use cases covered
false/0new values are kept; quoted column names are unquoted.from → to.EventTypemakes the test fail until it is classified.Unit tests
src/components/AuditLog/AuditLogList.test.tsx(32 tests, component behaviour)src/components/AuditLog/AuditLogList.utils.test.ts(53 tests, all utils exports)npx jest src/components/AuditLog src/pages/AuditLogsPage src/components/discovery/personal-space/Profile/tabs/access-control→ 206 passed.AuditLogList.component.tsx98.9% lines,AuditLogList.utils.ts98.6% lines.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Pages/AuditLogs.spec.tswas checked by reading it: everydata-testidit uses is still rendered. Pending: run that spec.Manual testing performed
DEV_SERVER_TARGET=http://localhost:8585 npx vite) against a local server.snowflake_demo.SALES_DB.PUBLIC.customer: added a tier, a classification tag, a glossary term, a domain and a team owner, then removed a tag. Edited the table and column descriptions.customer_orders.UI screen recording:
Screenshots below. Not applicable — a recording was waived by the author; this improves an existing page, and the screenshots show every event type.
Checklist:
Fixes <issue-number>: <short explanation>. Not done: this is a partial delivery of Audit Logs UI: show the details the API already returns (exact time, affected asset, field path, old → new values) #38210, so the title saysPart of.Part of #38210).REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.OwnerChip(single-source rule); HTML entities are decoded; object lists no longer say "N results"; the event-color test now covers the wholeEventTypeenum; two assertions that could never fail are removed; the entity-type lookup is shared.Tagwithout links by design decision, since the coreTaghas nohref. Status colors are a UI heuristic, because the server has no classification for these free-form status strings.🤖 Generated with Claude Code